package com.itheima.config;

import com.itheima.domain.UserInfo;
import com.itheima.service.UserInfoService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import java.util.List;

public class Demo {
    public static void main(String[] args) {
        ApplicationContext ac = new AnnotationConfigApplicationContext(SpringConfig.class);
        UserInfoService use = ac.getBean(UserInfoService.class);
        List<UserInfo> all = use.findAll();
        System.out.println(all);
    }
}
